package com.wpq.game_company.service.impl;

import com.wpq.game_company.domain.Company;
import com.wpq.game_company.domain.Game;
import com.wpq.game_company.mapper.CompanyMapper;
import com.wpq.game_company.service.ICompanyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CompanyServiceImpl implements ICompanyService {

    @Autowired
    CompanyMapper companyMapper;
    @Override
    public Integer insert(Company company) {

        return companyMapper.insert(company);
    }

    @Override
    public List<Company>  selectAll() {
        return companyMapper.selectAll();
    }

    @Override
    public Integer updata(Company company) {
        return companyMapper.updata(company);
    }

    @Override
    public Integer delete(int id) {
        return companyMapper.delete(id);
    }

    @Override
    public Company findcompanyByid(int id) {
        return companyMapper.findcompanyByid(id);
    }

    @Override
    public List<Game> selectgamebyid(int id) {
        return companyMapper.findgameByid(id);
    }
}
